package com.hzqiuxm.tdddemo001;

/**
 * Copyright © 2020年 tdd-demo-001. All rights reserved.
 *
 * @author 临江仙 hzqiuxm@163.com
 * 满足Junit5测试类的模拟业务类代码
 * @date 2020/6/30 10:15
 */
public class App {

    public long add(long[] addNums){

        long result = 0L;

        if(addNums == null || addNums.length == 0){

            System.out.println("is here" + addNums);
            throw new IllegalArgumentException("Operands argument cannot be null");
        }


        for (int i = 0; i < addNums.length; i++){

            result += addNums[i];
        }

        return result;
    }
}
